
module.exports = {
  lintOnSave: false,  //关闭eslint检查
  devServer: {
    /**处理前后端分离跨域问题*/
    proxy: {
      // proxy all requests starting with /api to jsonplaceholder
      '/api': {// 代理的虚拟目录
        target: 'http://127.0.0.1:5000',//请求后台Node项目的url
        ws: true, //代理websockets
        changeOrigin: true, //是否跨域
        pathRewrite: {
          '^/api': 'http://127.0.0.1:5000/api'
        }
      },
      '/upload': {// 代理的虚拟目录
        target: 'http://127.0.0.1:5000',//请求后台Node项目的url
        ws: true, //代理websockets
        changeOrigin: true, //是否跨域
        pathRewrite: {
          '^/upload': 'http://127.0.0.1:5000/upload'
        }
      }
    }
  },
  css: {
    loaderOptions: {
      sass: {
        // data：`@import "~@/assets/variable.scss";` v7之前使用 的是data，现在改成了prependData
        prependData: `@import "~@/assets/base.scss";`,
        /* prependData: `
              @import "~@/assets/variable.scss";
              @import "~@/assets/variable2.scss";
          ` */
          
      },
      less:{
        // data：`@import "~@/assets/variable.scss";` v7之前使用 的是data，现在改成了prependData
        prependData: `@import "~@/assets/lessreset.less";`,
        /* prependData: `
              @import "~@/assets/variable.scss";
              @import "~@/assets/variable2.scss";
          ` */
          
      },
    }
  }
}